<template>
    <header class="header">
        <h1>小黑记事本</h1>
        <input type="text" v-model="todoName" @keyup.enter="">
        <button @click="handleAdd"></button>
    </header>
</template>
<script>
export default{
    props: [],
    props: {
        key: leixing
    },
    data(){
        return {
            todoName: '',
            list: JSON.parse(htis.value) | [{},{}]
        }
    },
    methods: {
        handleAdd(){
            this.$emit('add',this.todoName)
            this.$emit('add',this.tooName)
            this.$emit('ad',this.canshu)
        }
    },
    watch: {
        key: {
            deep: true,
            handler(newvalue){
                localStorage.setItem('key',value)
                localStorage.setItem('key',JSON.stringify(newvalue))
                 localStorage.setItem('key',JSON.stringify(this.key))
            }
        }
    }
}
</script>
<style scoped></style>